home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / wp2x110.zip / WP2X.CAT < prev    next >
Text File  |  1991-09-01  |  20KB  |  522 lines

  1.  
  2.  
  3.  
  4. WP2X(1)                  USER COMMANDS                    WP2X(1)
  5.  
  6.  
  7.  
  8. NAME
  9.       wp2x - A WordPerfect 4.2 to whatever converter
  10.  
  11. SYNOPSIS
  12.      wp2x [ -s ] [ -n_b_l_i_p ] configfile wpfile
  13.  
  14. DESCRIPTION
  15.      _W_p_2_x is intended to convert _s_i_m_p_l_e files stored in  WordPer-
  16.      fect  4.2 format into any other document processing language
  17.      that uses plain text files.  Examples  include  TeX,  LaTeX,
  18.      troff, GML, and SCRIPT.
  19.  
  20.      _W_p_2_x reads a configuration file and a WordPerfect 4.2  input
  21.      file,  and uses the information in them to produce an output
  22.      file, which is sent to stdout.  If  the  configuration  file
  23.      cannot  be found, a suffix of ._c_f_g is appended.  the current
  24.      directory  is   searched,   as   well   as   the   directory
  25.      /_u_s_r/_l_o_c_a_l/_l_i_b/_w_p_2_x  ,  and the directories specified by the
  26.      environment variables _P_A_T_H , _D_P_A_T_H , and _W_P_2_X_L_I_B .
  27.  
  28.      The following codes are processed by _w_p_2_x:
  29.  
  30.          Hard returns.
  31.          Sort returns.
  32.          Hyphens of all ages.
  33.          Hard page breaks.
  34.          Margin settings.
  35.          Line spacing.
  36.          Tab characters.
  37.          Boldface, underline, redline.
  38.          Indented paragraphs.  (The "Indent" code.)
  39.          Footnotes and endnotes.
  40.          Footnote numbers inside footnotes.
  41.          Extended IBM codes.
  42.          Superscript, subscript, overstrike.
  43.          Hyphenation on/off.
  44.          Justification on/off.
  45.          Widow/Orphan control.
  46.          Hyphenation zone.
  47.          Decimal alignment character.
  48.          Page centering.
  49.          Page number position.
  50.          Headers and footers.
  51.          Single-page suppression of header/footer information.
  52.          Lots of other stuff.
  53.  
  54.      The following codes are recognized, but not translated.
  55.  
  56.          Page number column
  57.          Underline mode
  58.          Column definitions
  59.          Footnote attributes
  60.          Automatic paragraph numbering
  61.          Marked text
  62.          Invisible text
  63.  
  64.      These  codes  are  not  translated  because  documents  that
  65.      require  these  codes  typically  would  require significant
  66.      hand-editing.  Hence, there's no point in trying to  emulate
  67.      something you're going to delete anyway.  (Remember, _w_p_2_x is
  68.      not intended to be used as an automated conversion  program.
  69.      Rather,  it  is  intended to be used as a single step in the
  70.      document conversion process, which  gets  most  of  the  the
  71.      grunt  work  of  conversion done and out of the way, so that
  72.      you can concentrate your efforts on converting the  trickier
  73.      parts of the document.  The object of the game is to produce
  74.      a readable conversion, rather than a perfect conversion.)
  75.  
  76.      As the program runs, a dot is printed to  _s_t_d_e_r_r  for  every
  77.      1024  characters converted.  This can be suppressed with the
  78.      -s switch, and the interval between dots can be changed with
  79.      the -n switch.
  80.  
  81. OPTIONS
  82.      -s   Suppresses all non-error output  to  _s_t_d_e_r_r,  including
  83.           the  _t_y_p_e_o_u_t  banner,  the  progress dots, and warnings
  84.           about undefined expansions.
  85.  
  86.      -n_b_l_i_p
  87.           Every _b_l_i_p tokens, a dot is emitted to  _s_t_d_e_r_r,  unless
  88.           the  -s  switch  is  given.  The value _b_l_i_p must appear
  89.           imediately following  the  -n  without  an  intervening
  90.           space.   If  no  -n switch is supplied, then a value of
  91.           1024 is assumed.
  92.  
  93. USAGE
  94.      The configuration file controls how the  file  is  converted
  95.      from WordPerfect 4.2 format.  Each line of the configuration
  96.      file is of the form
  97.  
  98.                       identifier="list of codes"
  99.  
  100.      where the list of codes is a string which will be placed  in
  101.      the  output  stream  whenever  the corresponding WordPerfect
  102.      code  is  encountered.   Standard  C-style  backslash-escape
  103.      sequences  are  recognized,  as well as \xFF for hex values.
  104.      You do not have to backslash-protect a newline.  Some  iden-
  105.      tifiers  supply replacable parameters, which can be interpo-
  106.      lated as follows:
  107.  
  108.      %1   interpolate first parameter as a decimal integer.
  109.  
  110.      %2   interpolate second parameter as a decimal integer.
  111.  
  112.      %c   interpolate first parameter as an ASCII character.
  113.  
  114.      %\n  interpolate a newline if the most-recently-output char-
  115.           acter was not already a newline.  (The _\_n can be either
  116.           the C-style escape sequence, or an actual newline char-
  117.           acter.)  Use  this  if the expansion must take place at
  118.           the beginning of a line.  (For example,  _t_r_o_f_f  control
  119.           characters  must  appear  as the first character in the
  120.           line in order to take effect.) This sequence  is  mean-
  121.           ingful  only  at  the  beginning  of  the string; if it
  122.           appears elsewhere, it is flagged as erroneous.
  123.  
  124.      %%   interpolate a percent-sign.
  125.  
  126.      A percent sign followed by any other character is considered
  127.      an  error.   It  is also an error to interpolate a parameter
  128.      that is not applicable to the identifier being defined.  You
  129.      may  interpolate  the  parameters  as  many times as, and in
  130.      whatever order, you wish.  (With the exception  of  the  %_\_n
  131.      code.)
  132.  
  133.      Here follows a list of the  accepted  identifiers.   In  the
  134.      discussion,  `%1'  represents  the first parameter, and `%2'
  135.      the second.  Remember that the character version  of  %1  is
  136.      available as `%c'.
  137.  
  138.      BEGIN          Expanded at the beginning of the file.
  139.      END            Expanded at the end of the file.
  140.      COMMENT        Expanded when wp2x needs to insert a  comment
  141.                     into  the  output.   The comment is passed as
  142.                     %s.
  143.  
  144.      PageNo         Insert current page number
  145.      RomanPage      Set page number to %1, and set  roman-numeral
  146.                     mode
  147.      ArabicPage     Set page number to %1, and set arabic-numeral
  148.                     mode
  149.  
  150.      Tab            What to do when you see a tab character.
  151.      BeginTabs      Emitted  when  tab  settings  are  about   to
  152.                     change.  The BeginTabs code should delete all
  153.                     existing tabs and prepare for  new  tab  set-
  154.                     tings  to start.  All tab values are given in
  155.                     columns measured from the physical left  edge
  156.                     of the paper.  (Not from the left margin.)
  157.      SetTab         Set  a  normal  (left-justified)  tabstop  at
  158.                     column %1.
  159.      SetTabCenter   Set a centered tabstop at column %1.
  160.      SetTabRight    Set a right-justified tabstop at column %1.
  161.      SetTabDecimal  Set a decimal tab at column %1.
  162.      EndTabs        Finish the setting of tabstops.
  163.  
  164.      For example, if the WordPerfect file contains  a  code  that
  165.      says  `Set  new  tabstops as follows:  Regular tab at column
  166.      15, a centered tab at column 40, a  right-justified  tab  at
  167.      column 59, and a regular tab at column 60', then the follow-
  168.      ing expansions are made in succession:
  169.  
  170.          BeginTabs
  171.          SetTab(15)
  172.          SetTabCenter(40)
  173.          SetTabright(59)
  174.          SetTab(60)
  175.          EndTabs
  176.  
  177.      HSpace
  178.           Hard (nonbreakable) space.
  179.      HPg  Hard page break.
  180.      CondEOP
  181.           Force a new page if fewer than %1 half-lines remain  on
  182.           current page.
  183.  
  184.      HRt  Hard return.
  185.      SRt  Soft return.
  186.  
  187.      -    Breakable hyphen.
  188.      --   Breakable hyphen, appearing at the end of a line.
  189.      =    Non-breakable hyphen.
  190.      \-   Discretionary hyphen.
  191.      \--  Discretionary hyphen, appearing at the end of a line.
  192.  
  193.      Marg Set left margin at %1 characters and right margin at %2
  194.           characters.
  195.      TopMargin
  196.           Set top margin to %1 lines.
  197.      PageLength
  198.           Set page length to %1 lines.
  199.  
  200.      SS   Single spacing.
  201.      DS   Double spacing